package org.luxor.commons.security.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 登陆成功返回实体
 *
 * @author Mr.Yan
 */
@ApiModel(description = "登陆成功返回实体")
public class AuthenticationSuccessDto {

    @ApiModelProperty(value = "用户登陆凭证")
    private String token;

    @ApiModelProperty(value = "有效期(单位:秒)")
    private long expiresIn;

    public AuthenticationSuccessDto(String token, long expiresIn) {
        this.token = token;
        this.expiresIn = expiresIn;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public long getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(long expiresIn) {
        this.expiresIn = expiresIn;
    }

    @Override
    public String toString() {
        return "AuthenticationSuccessDto{" +
                "token='" + token + '\'' +
                ", expiresIn=" + expiresIn +
                '}';
    }
}
